package com.meilai.project.dto.personnel.onTurn;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.meilai.project.dto.workflow.WorkFlowExtraSubmitDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * @author 杨凯博
 * @date 2022/1/25
 */

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(value = "离职申请表", description = "离职申请表")
public class LeaveOfficeApplyDTO extends WorkFlowExtraSubmitDTO {

    @ApiModelProperty(value = "当前状态（0：保存；2、退回；3、流程中；4、通过；5、删除）", example = "0")
    private Integer flow_status;
    @ApiModelProperty(value = "姓名")
    private String name;
    @ApiModelProperty(value = "拟离职日期最小值，时间段搜索的起始，yyyy-MM-dd")
    private String plan_leave_date_min;
    @ApiModelProperty(value = "拟离职日期最大值，时间段搜索的结束，yyyy-MM-dd")
    private String plan_leave_date_max;
    @ApiModelProperty(value = "合同截止日期最小值，时间段搜索的起始，yyyy-MM-dd")
    private String contract_end_at_min;
    @ApiModelProperty(value = "合同截止日期最大值，时间段搜索的结束，yyyy-MM-dd")
    private String contract_end_at_max;
    @ApiModelProperty("员工类型id")
    private Integer staff_type_id;

    @ApiModelProperty("拟离职日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate plan_leave_date;
    @ApiModelProperty("合同截止日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate contract_end_at;
    @ApiModelProperty("离职原因")
    private String reason;
    @ApiModelProperty("对公司的建议")
    private String advice;
    @ApiModelProperty("附件-离职交接单链接")
    private String attachment_handover_sheet;
    @ApiModelProperty("合同解除日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate termination_date;
}
